#ifndef MYSCRIPT_H
#define MYSCRIPT_H

enum FILE_ERROR_TYPE {
	E_SUCCESS = 0,
	E_R_OPEN_ERROR,
	E_R_HEADER_ERROR,
	E_R_STRINGTABLE_ERROR,
	E_R_HOSTAPI_ERROR,
	E_R_INSTRSTREAM_ERROR,
	E_R_FUNCTIONTABLE_ERROR,
	
	E_W_OPEN_ERROR,

};

class TScript {
public:
	FILE_ERROR_TYPE  readFile(const char *name);
	FILE_ERROR_TYPE  writeFile(const char  *name);
	void dump();

protected:
	ScriptHeader _sh;
	StringTable  _st;
	StringTable  _hst;
	InstrStream  _is;
	FuncTable    _ft;
	SymTable     _syt;

};

#endif
